package com.github.dengmin.mysql.common;

/**
 * @Author dengmin
 * @Created 2020/6/6 上午10:09
 */
public class SQL {
    private static final long serialVersionUID = 1L;
    public static String querySchema = "select * from  information_schema.schemata where schema_name not in('mysql', 'information_schema', 'performance_schema')";
    public static String queryTable = "select * from information_schema.tables where table_type='BASE TABLE' AND TABLE_SCHEMA=?";
    public static String queryColumns = "select * from `%s`.`%s` limit 1";
    public static String queryCount = "select 1 from `%s`.`%s`";
    public static String queryCommon = "select * from `%s`.`%s` limit %d, %d";
    public static String insertConnection = "insert into database_connection(name, host,port,username,password,dbName) values(?,?,?,?,?,?)";
    public static String queryConnection = "select * from database_connection where id=?";
    public static String queryUserByName = "select * from user where username=?";
    public static String queryRoleById = "select * from role where id=?";
}
